﻿using FluentNHibernate.Mapping;
using MediaMover.Common.TV;

namespace MediaMover.Data.NHIbernate.Mappings
{
    public class SeasonMap : ClassMap<Season>
    {
        public SeasonMap()
        {
            Table("Seasons");
            Id(x=>x.Id, "SeasonID");
            Map(x => x.Number);
            HasMany(x => x.Episodes).KeyColumn("ParentID").Cascade.AllDeleteOrphan().Not.LazyLoad();
        }
    }
}
